package com.link2room.quintesson.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by sss on 2017/4/6.
 */
@Entity
@Table(name = "taobao_sroomtype")
@DynamicInsert
public class TaobaoSroomtype extends BaseEntity{
    private String outerRid;
    private Long rid;
    private String srmtype;

    @Basic
    @Column(name = "outer_rid", nullable = false, length = 32)
    public String getOuterRid() {
        return outerRid;
    }

    public void setOuterRid(String outerRid) {
        this.outerRid = outerRid;
    }

    @Basic
    @Column(name = "rid", nullable = true)
    public Long getRid() {
        return rid;
    }

    public void setRid(Long rid) {
        this.rid = rid;
    }

    @Basic
    @Column(name = "srmtype", nullable = true, length = -1)
    public String getSrmtype() {
        return srmtype;
    }

    public void setSrmtype(String srmtype) {
        this.srmtype = srmtype;
    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TaobaoSroomtype that = (TaobaoSroomtype) o;

        if (outerRid != null ? !outerRid.equals(that.outerRid) : that.outerRid != null) return false;
        if (rid != null ? !rid.equals(that.rid) : that.rid != null) return false;
        return srmtype != null ? srmtype.equals(that.srmtype) : that.srmtype == null;

    }

    @Override
    public int hashCode() {
        int result = outerRid != null ? outerRid.hashCode() : 0;
        result = 31 * result + (rid != null ? rid.hashCode() : 0);
        result = 31 * result + (srmtype != null ? srmtype.hashCode() : 0);
        return result;
    }
}
